package com.fw.system.admin.service.impl;

import java.util.List;
import com.fw.common.IdXD;
import com.fw.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.fw.system.admin.mapper.TbAboutMapper;
import com.fw.system.admin.domain.TbAbout;
import com.fw.system.admin.service.ITbAboutService;

/**
 * 平台介绍Service业务层处理
 * 
 * @author xxx
 * @date 2021-12-03
 */
@Service
public class TbAboutServiceImpl extends ServiceImpl<TbAboutMapper, TbAbout> implements ITbAboutService
{
    @Autowired
    private TbAboutMapper tbAboutMapper;

    @Autowired
    private IdXD idXD;

    /**
     * 查询平台介绍
     * 
     * @param id 平台介绍ID
     * @return 平台介绍
     */
    @Override
    public TbAbout selectTbAboutById(String id)
    {
        return tbAboutMapper.selectTbAboutById(id);
    }

    /**
     * 查询平台介绍列表
     * 
     * @param tbAbout 平台介绍
     * @return 平台介绍
     */
    @Override
    public List<TbAbout> selectTbAboutList(TbAbout tbAbout)
    {
        return tbAboutMapper.selectTbAboutList(tbAbout);
    }

    /**
     * 新增平台介绍
     * 
     * @param tbAbout 平台介绍
     * @return 结果
     */
    @Override
    public int insertTbAbout(TbAbout tbAbout)
    {
        tbAbout.setCreateTime(DateUtils.getNowDate());
        tbAbout.setId(idXD.nextId());
        return tbAboutMapper.insertTbAbout(tbAbout);
    }

    /**
     * 修改平台介绍
     * 
     * @param tbAbout 平台介绍
     * @return 结果
     */
    @Override
    public int updateTbAbout(TbAbout tbAbout)
    {
        return tbAboutMapper.updateTbAbout(tbAbout);
    }

    /**
     * 批量删除平台介绍
     * 
     * @param ids 需要删除的平台介绍ID
     * @return 结果
     */
    @Override
    public int deleteTbAboutByIds(String[] ids)
    {
        return tbAboutMapper.deleteTbAboutByIds(ids);
    }

    /**
     * 删除平台介绍信息
     * 
     * @param id 平台介绍ID
     * @return 结果
     */
    @Override
    public int deleteTbAboutById(String id)
    {
        return tbAboutMapper.deleteTbAboutById(id);
    }
}
